package b59;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main5{
    public static void main(String[] args) throws IOException {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        int s = Integer.parseInt(bf.readLine());
        int[][] points = new int[s][2];
        for (int i = 0; i < s; i++) {
            String[] s1 = bf.readLine().split(" ");
            points[i][0] = Integer.parseInt(s1[0]);
            int temp = Integer.parseInt(s1[1]);
            points[i][1] = points[i][0] + temp-1;
        }
        System.out.println(Arrays.deepToString(points));
        int maxCom = findMaxCom(points);
        System.out.println(maxCom);
    }

    public static int findMaxCom(int[][] points) {
        if (points.length == 0) {
            return 0;
        }
        Arrays.sort(points, (a,b) -> a[0] - b[0]);
        int max = 0;
        int ans = 1;
        int left = points[0][0];
        int right = points[0][1];
        for (int[] balloon: points) {
            if (balloon[0] >= left && balloon[0] <= right && balloon[1] >=right) {
                left = balloon[0];
                ++ans;
            }else if (balloon[0] >= left && balloon[1] <= right) {
                left = balloon[0];
                right = balloon[1];
                ans++;
            }

            if(balloon[0] > right){
                max = Math.max(max,ans);
                ans = 1;
                left = balloon[0];
                right = balloon[1];
            }
        }
        if(max == 0) {
            max = points.length;
        }
        return max;
    }

}
